import {RouterModule, Routes} from "@angular/router";

import {DataComp} from "app/Router/DataComp";
import {OrderComp} from "app/Router/OrderComp";
import {UserComp} from "app/Router/UserComp";
import {SettingComp} from "app/Router/SettingComp";
import {BoxComp} from "app/Router/BoxComp";
import {IndexSettingComp} from "app/Router/IndexSettingComp";
import {PayComp} from "app/Router/pay/PayComp";
import {BindWxComp} from "app/Router/pay/BindWxComp";


import {BoxProductIndexComp} from "app/Router/boxProduct/BoxProductIndexComp";
import {BoxSettingIndexComp} from "app/Router/boxSetting/BoxSettingIndexComp";
/**
 * 路由配置
 */
export const appRoutes:Routes = RouterModule.forRoot([
		/**
		 * 当前数据
		 */
		{path:"data",component:DataComp,data:{title:"当前数据"}},
		
		/**
		 * 订单管理
		 */
		{path:"order",component:OrderComp,data:{title:"订单"}},
		
		{path:"bind_wx",component:BindWxComp, data:{title:"绑定微信"}},
		
		{path:"pay",component:PayComp,data:{title:"在线支付"}},
		
		{path:"user", component:UserComp, data:{title:"用户"}},
		
		{
			path:"box/:id",component:BoxComp,data:{title:"盒子"},
			children:[
				{path:"setting", component:BoxSettingIndexComp},
				{path:"product", component:BoxProductIndexComp}
			]
		},
		
		{path:"index_setting", component:IndexSettingComp},
		
		/**
		 * 设置
		 */
		{path:'setting',component:SettingComp,data:{title:"设置"}}
		
], {useHash:true});